The simplest use of awnpipe is as an ordinary pipe. That means put data into one end of a pipe and read it out the other.
In a shell type 'echo >awnpipe:mypipe hello'
Now type 'type awnpipe:mypipe'
The word hello went into the pipe from the echo command, and came out with the type command.
HINT: Drag select the text then use right Amiga C to copy the examples out of these docs. This helps avoid typos.
---
'mypipe' was the name of the pipe. More than one pipe can exist at the same time.
In a shell type 'echo >awnpipe:mypipe1 hello'
In a shell type 'echo >awnpipe:mypipe2 goodbye'
In a shell type 'type awnpipe:mypipe1'
In a shell type 'type awnpipe:mypipe2'
Two pipes each with a different name.
---
Make sure you have two different shells available.
In the first shell type 'type awnpipe:mypipe'
In the second shell type 'echo >awnpipe:mypipe hello'
You opened the read end of the pipe first. The type command waited until data was available from the pipe THEN returned.
A word of caution. NEVER try to read from both ends of the pipe at the same time. If you 'type awnpipe:mypipe1' in two separate shells both will hang waiting for data to come from the pipe.
If this happens to you during testing open the pipe a third time adding '/a' to the pipename 'type awnpipe:mypipe/a'. This causes the pending reads to abort and the deadlock ends.
---
To use AWNPipe for other functions you add '/' followed by some parameters to the pipe name.'/h' will cause the pipe to translate a few special characters to there HTML equivalents. Note that the '/h' is only used when writing to the pipe.
In a shell type 'echo >awnpipe:mypipe/h "& > <"'
In a shell type 'type awnpipe:mypipe'
See the advanced examples for more types of data conversion.
---
It is possible to have a pipe automatically connect it self to a file.
'/wFILENAME' writes the output of the pipe to FILENAME.
In a shell type 'echo >awnpipe:mypipe/h/wram:AWNPtest "& > <"'
YES there are two colons ':' in the redirection. Don't let it bug you.
Take a look at the file ram:AWNPtest (with your favorite text editor).
---
'/u' reverses the translation done by '/h' and '/rFILENAME' reads data into a
pipe.
In a shell type 'type awnpipe:mypipe/u/rram:AWNPtest'
The contents of the file are read and translated.
---
It is possible to have a pipe automatically connect it self to the clipboard.
In a shell type 'echo >awnpipe:mypipe/c hello'
The word hello was placed into the clipboard. Use your text editor to check it out. Then put different text into the clipboard using your text editor.